﻿@model HyEduOnline.Entities.TbStudents
@{
    ViewBag.Title = "等待考试";
    Layout = "~/Views/Shared/_GridCommonLayout.cshtml";
}

<link href="~/Scripts/FlipClock/flipclock.css" rel="stylesheet" />

@{
    var waitTime = ViewBag.waitTime < 0 ? 1 : ViewBag.waitTime;
}
<input value="@waitTime" id="waitTime" type="hidden"/>
<div class="heading-buttons">


    <div class="col-xs-12 col-sm-7 col-md-7 col-lg-4" style="margin-left: 8%;">
        <h1 class="page-title txt-color-blueDark" style="font-size: 30px;"><i class="fa fa-star-half-full fa-fw "></i>
            @ViewBag.testName
        </h1>
    </div>

    <div style="clear: both;">
    </div>
</div>

<div class="row">
    <div class="col-sm-4" style="height: 500px;">
        <div style="width: 100%; height: 25%;">
            <div class="clock" style="margin: 0; margin-left: 20%;"></div>
        </div>
        <div style="width: 80%; height: 75%; background-color: #b6ff00; margin-left: 20%;">
            <fieldset>
                <legend style="font-size: 20px; color: red; text-align: center;">考 生 须 知</legend>
                <div style="position: absolute; overflow-y: auto; overflow-x: auto; height: 310px;">
                    <p>一、考生必须服从监考人员的监督管理。不准交头接耳，左顾右盼，传递物品，打手势，做暗号；不准擅自借用其他考生文具；不准偷看、抄袭他人答卷或允许他人抄袭自己的答卷；严禁夹带；严禁换卷、替考，以及其他违纪、舞弊行为。</p>
                    <p>二、在考试期间原则上不允许上厕所，若遇特殊情况，须由工作人员陪同出入考场。</p>
                    <p>三、考试结束指令发出后，考生立即停止答卷，将答卷（答题卡）反扣在桌面上，并按监考人员要求退离考场。严禁将试卷、答卷（答题卡）和考场统一发放的草稿纸带出考场。</p>
                    <p>四、留考考生必须服从考试工作人员和监考人员的安排，不得与其他考生或场外人员接触。</p>
                    <p>四、留考考生必须服从考试工作人员和监考人员的安排，不得与其他考生或场外人员接触。</p>
                    <p>四、留考考生必须服从考试工作人员和监考人员的安排，不得与其他考生或场外人员接触。</p>
                </div>
            </fieldset>
        </div>
    </div>
    <div class="col-sm-7" style="background-color: #0094ff; height: 500px;">

        <div style="width: 100%; height: 400px;">
            <form class="form-horizontal">
                <fieldset>
                    <div class="row" style="border-bottom: dashed 1px; margin-bottom: 10px;">
                        <h3 style="padding: 10px 0 10px 10px; float: left;"><strong>考生考试信息</strong></h3>
                    </div>

                    <div style="clear: both;"></div>
                    <!--学生信息-->
                    <div class="col-sm-9">
                        <div class='form-group'>
                            <label class='col-md-2 control-label' style='margin-bottom: 3px;'>学号：</label>
                            <div class='col-md-9 control-label' style="width: 350px; text-align: left;">
                                @Html.Raw(Model.SNo)
                            </div>
                        </div>
                        <div class='form-group'>
                            <label class='col-md-2 control-label' style='margin-bottom: 3px;'>姓名：</label>
                            <div class='col-md-9 control-label' style="width: 350px; text-align: left;">
                                @Html.Raw(Model.SName)
                            </div>
                        </div>

                        <div class='form-group'>
                            <label class='col-md-2 control-label' style='margin-bottom: 3px;'>性别：</label>
                            <div class='col-md-9 control-label' style="width: 350px; text-align: left;">

                                @ViewBag.Sex
                            </div>
                        </div>

                        <div class='form-group'>
                            <label class='col-md-2 control-label' style='margin-bottom: 3px;'>身份证号：</label>
                            <div class='col-md-9 control-label' style="width: 350px; text-align: left;">
                                @Html.Raw(Model.SIdCard)
                            </div>
                        </div>

                        <div class='form-group'>
                            <label class='col-md-2 control-label' style='margin-bottom: 3px;'>学院：</label>
                            <div class='col-md-9 control-label' style="width: 350px; text-align: left;">
                                @Html.Raw(Model.SColleName)
                            </div>
                        </div>

                        <div class='form-group'>
                            <label class='col-md-2 control-label' style='margin-bottom: 3px;'>专业：</label>
                            <div class='col-md-9 control-label' style="width: 350px; text-align: left;">
                                @Html.Raw(Model.SProName)
                            </div>
                        </div>

                        <div class='form-group'>
                            <label class='col-md-2 control-label' style='margin-bottom: 3px;'>班级：</label>
                            <div class='col-md-9 control-label' style="width: 350px; text-align: left;">
                                @Html.Raw(Model.SClassName)
                            </div>
                        </div>
                    </div>
                    <!--学生信息-->

                    <!--头像-->
                    <div class="col-sm-3">
                        @{
                            var src = Model.SPicUrl == "" ? "~/Images/headpic.png" : Model.SPicUrl;
                        }

                        <img src="@src"/>
                    </div>
                    <!--头像-->
                </fieldset>
            </form>
        </div>
        <div style="clear: both;"></div>

        <div style="width: 100%; height: 100px;">
            <div class="col-sm-3" style="float:right;">
                <a id="starTest" href="/Exam/Examing" class="btn btn-primary btn-lg disabled" role="button">开始考试</a>
            </div>
        </div>
    </div>
</div>

<script src="~/Scripts/FlipClock/flipclock.js"></script>
<script type="text/javascript">

    var clock;


    $(document).ready(function () {
        var clock;

        var waitTime = $("#waitTime").val();//等待时间

        clock = $('.clock').FlipClock(waitTime, {
            clockFace: 'MinuteCounter',
            countdown: true,
            callbacks: {
                stop: function () {
                    $("#starTest").removeClass("btn btn-primary btn-lg disabled");
                    $("#starTest").addClass("btn btn-primary btn-lg active");
                }
            }
        });

    });
</script>
